-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use @pragma('vm:awaiter-link')
for better stacktraces
#2292
base: main
Are you sure you want to change the base?
Conversation
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
Could you also add tests to make sure stack traces have been improved? |
Tests should be fairly straightforward to add. Just make the various cases throw an exception and call toString() on the stacktrace. Also make sure the stacktraces are actually better than before. The ones in the test suite probably don't need tests, though |
@codedbycurtis Still going to work on this? |
@AlexV525 Apologies for the lack of updates on this. I tried to implement these tests a few weeks ago but was having trouble getting the tests to run with melos (something regarding invalid filters so probably just some obscure configuration issue on my end), and have not had the time recently to look into the issue. I am happy enough if someone else wants to take over and look into getting these tests added. |
@@ -12,6 +12,7 @@ import 'options.dart'; | |||
class CancelToken { | |||
CancelToken(); | |||
|
|||
@pragma('vm:awaiter-link') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test gives the same stack trace when I was adding this. Could you tell if the adding pragmas are working as expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great question. Unfortunately, I don't have an answer :( Maybe it's because it's indeed the same since Dart could already figure out the correct stacktrace without the pragma here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to try without the test to see if it's because of the tester can work out with traces.
Added the
@pragma('vm:awaiter-link')
annotation to each instance ofCompleter
.Closes #2291.
New Pull Request Checklist
main
branch to avoid conflicts (via merge from master or rebase)CHANGELOG.md
in the corresponding packageAdditional context and info (if any)
N/A